﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;
using System.Runtime.Remoting.Services;
using Microsoft.Win32.SafeHandles;

namespace 类与对象1._0
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Hashtable ht = new Hashtable();
            student[] students = new student[3]; 
            

            for(int i = 0;i <= 2;i++)
            {
                Console.WriteLine("Enter No.{0}:", i + 1);
                students[i] = new student(int.Parse(Console.ReadLine()),Console.ReadLine(), double.Parse(Console.ReadLine()));
                ht.Add(students[i].getNum() , students[i].getScore());
            }

            double min = students[0].getScore();
            int k = students[0].getNum();

            foreach(int i in ht.Keys)
            {
                if(min > (double)ht[i])
                {
                    min = (double)ht[i];
                    k = i;
                } 
            }
            
            Console.WriteLine("最小：{0}    {1}", k, ht[k]);
        }
    }
}
